import 'package:boss/ui/page/printer/page/printerStepOne/printer_step_one_page.dart';
import 'package:boss/ui/page/printer/widget/printer_list.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:boss/ui/widget/label_button.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:router/annotation.dart';

@RouterConfig(PrinterPage.pageName)
class PrinterPage extends StatefulWidget {
  static const pageName = '/printerPage';

  @override
  _PrinterPageState createState() => _PrinterPageState('打印机设置');
}

class _PrinterPageState extends BaseState<PrinterPage> {
  _PrinterPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CenterTitleAppBar(
        title: '云打印设置',
        actions: <Widget>[
          LabelButton(
            title: '新增打印机',
            onTap: () {
              Navigator.pushNamed(context, PrinterStepOnePage.pageName);
            },
          ),
        ],
      ),
      body: PrinterList(),
    );
  }
}
